<?php

/**
 * This components draws the page footer, using a structure element.
 * The structure element must have type __footer in the database (system module)
 *
 * @author Apple
 */

class footerComponents extends myComponents
{  public function executeRender()  {    $struct = $this->getRoute()->getObject();    $footer = false;        // Trying to find footer structure    if($struct->getParameter() == 'clients' || $struct->getParent()->getParameter() == 'clients')  {      if($struct->getParameter() == 'clients') {        $clildren = $struct->getNode()->getChildren();      } else {        $children = $struct->getNode()->getParent()->getNode()->getChildren();      }            foreach($children as $child) {        if($child->getParameter() == '__footer')          $footer = $child;      }    }
    
    // Now we have the footer structure
    $this->footer = $footer;
  }
};